package com.gjintel.business.report.service.Impl;

import com.gjintel.auction.business.model.AuctionInfo;
import com.gjintel.business.proj.model.DepositReturn;
import com.gjintel.business.proj.model.ProjectInfo;
import com.gjintel.business.report.dao.IAuctionReportDao;
import com.gjintel.business.report.service.IAuctionReportService;
import com.gjintel.framework.register.model.DepositCategory;
import com.gjintel.sdk.base.dao.Page;
import com.gjintel.sdk.base.dao.Sort;
import com.gjintel.sdk.base.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.List;

@SuppressWarnings("unchecked")
@Service("auctionReportService")
public class AuctionReportServiceImpl extends BaseServiceImpl implements IAuctionReportService {
	
	@Autowired
	private IAuctionReportDao auctionReportDao;

	@Override
	public List<DepositCategory> listAuction() {
		
		return auctionReportDao.listAuction();
	}
	

	@Override
	public List<DepositReturn> getAuctionDepositList(String projectName , String code, Page page, Integer depositType, String projectType) {
			
		return auctionReportDao.getAuctionDepositList(projectName,code,page,depositType,projectType);
	}
	
	@Override
	public List<AuctionInfo> findAuctionReportByProjectCase(AuctionInfo auction, Page page, Sort sort, Date startTime,
                                                            Date stopTime) {
		return auctionReportDao.findAuctionReportByProjectCase(auction,page,sort,startTime,stopTime);
	}


	@Override
	public List<DepositReturn> getAuctionDepositListExport(String projectName, String code, Integer depositType, String projectType) {
		
		return auctionReportDao.getAuctionDepositListExport(projectName,code,depositType,projectType);
	}

	@Override
	public BigDecimal findAuctionDepositAmountByDate(Integer depositType,Integer status, Date startTime, Date stopTime,String className) {
		return this.auctionReportDao.findAuctionDepositAmountByDate(depositType,status,startTime,stopTime,className);
	}

	@Override
	public List findAuctionDepositListByDate(Page page, Integer depositType, Integer status, Date startTime, Date stopTime, String className) {
		return this.auctionReportDao.findAuctionDepositListByDate(page,depositType,status, startTime, stopTime, className);
	}


	@Override
	public List findAuctionReportByProjectList(ProjectInfo project, Page page, Sort sort, Date startTime, Date stopTime) {
		return this.auctionReportDao.findAuctionReportByProjectList(project,page,sort,startTime,stopTime);
	}
	
	@Override
	public List findAuctionReportByNoOpentBidProjectList(ProjectInfo project, Page page, Sort sort, Date startTime, Date stopTime) {
		return this.auctionReportDao.findAuctionReportByNoOpentBidProjectList(project,page,sort,startTime,stopTime);
	}

}
